package com.bindapp.adapter;

import android.view.View;

import com.bindapp.databinding.ItemYjBinding;
import com.bindapp.listener.RecyclerItemClick;

import java.util.List;

/**
 * Created by tom055 on 2018/7/22.
 */

public class YjAdapter extends BaseRcAdapter {

    public YjAdapter(List<Object> datas, int layoutId, int mVariableId, RecyclerItemClick listener) {
        super(datas, layoutId, mVariableId, listener);
    }

    @Override
    public void BinderHolder(BaseHolder holder, final int position) {
        if(holder instanceof ContentHolder){
            ((ItemYjBinding)holder.getBinding()).btn1.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    listener.onMoreClick(v,position);
                }
            });
            ((ItemYjBinding)holder.getBinding()).btn2.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    listener.onMoreClick(v,position);
                }
            });
        }

    }
}
